package com.github.jspxnet.worktask.model.enums;


import com.github.jspxnet.enums.EnumType;

/**
 * @author 陈原
 */

public enum SupervisePowerEnumType  implements EnumType {

    //全部
    DOC_OPINION(3, "全部信息"),

    DOC_ATT(2, "文档和附件"),

    DOC(1, "可以看文档"),

    NONE(0, "只能看流程");

    private final int value;
    private final String name;

    SupervisePowerEnumType(int value, String name) {
        this.value = value;
        this.name = name;
    }

    static public SupervisePowerEnumType find(int value) {
        for (SupervisePowerEnumType c : SupervisePowerEnumType.values()) {
            if (c.value == value) {
                return c;
            }
        }
        return SupervisePowerEnumType.NONE;
    }

    @Override
    public int getValue() {
        return this.value;
    }

    @Override
    public String getName() {
        return this.name;
    }

}
